import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'addColon'
})
export class AddColonPipe implements PipeTransform {
  transform(value: string, args: any[]) {
    if (!value || value === "-") return value;
    return value.slice(0, 2) + ":" + value.slice(2, 4) + ":" + value.slice(4, 6);
  }
}